1 import random
2 """
3 welcome to my stone-paperf-scissor game made of python language
4 Programmer: Shuvasis
5 language: Python
6 Email: scorpion004ss@gmail.com
7 """

8 total_input_left=
10
9 no_of_computer_win=
0
10 no_of_human_win=
0
11
12
13 print(
"\t \t \t r = Rock : p = Paper : s = Scissor (....Enter Q to stop) \n")
14
15 while
(total_input_left>0):
16     print(f
"\n[ Your chance left {total_input_left} ]")
17     total_input_left-=
1
18     human_input = input(
"Enter Your Choice....... \n")
19     human_input=human_input.lower()
20     computer_input = (random.choice([
"s","p","k"]))
21
22     
if human_input=="q":
23         print(
".........GAME END.........")
24         
break
25
26     elif human_input == computer_input:
27         print(
"Both are same !!!!!")
28
29     elif human_input ==
'r' and computer_input == 'p':
30         print(
"Computer won.....You lose....!!")
31         no_of_computer_win+=
1
32
33     elif human_input ==
'p' and computer_input == 'r':
34         print(
"You Won !!")
35         no_of_human_win+=
1
36
37     elif human_input ==
'r' and computer_input == 's':
38         print(
"You Won !!")
39         no_of_human_win+=
1
40
41     elif human_input ==
's' and computer_input == 'r':
42         print(
"Computer won.....You lose....!!")
43         no_of_computer_win+=
1
44
45     elif human_input ==
's' and computer_input == 'p':
46         print(
"You Won !!")
47         no_of_human_win+=
1
48
49     elif human_input ==
'p' and computer_input == 's':
50         print(
"Computer won.....You lose....!!")
51         no_of_computer_win+=
1
52
53     
else:
54         print(
"You Entered Wrong input....try again")
55
56
57 print(f
"\nComputer score {no_of_computer_win}\n Your score {no_of_human_win}")


Gõ tìm kiếm nhanh...